import { PrimaryUuid, DateTime, Desc, RichText, Title, Image, CmsArticleAuthor, CmsArticleType, CreateDate, UpdateDate, Entity, SysUserId, Jsonb, Text, Uuid } from '@sker/core'

@Entity({
    name: 'cms_article'
})
export class CmsArticle {
    static title: string = `文章`;
    static resource: string = `cms_article`;

    @PrimaryUuid({
        primaryKeyConstraintName: "PK_CMS_ARTICLE_DI"
    })
    id!: string;

    @Uuid({ comment: '打平分类', nullable: true })
    category_id!: string

    @Title({ comment: '标题' })
    title!: string;

    @Desc({ comment: '简介' })
    desc!: string;

    @Image()
    cover!: string;

    @RichText({ comment: '详情' })
    content!: string;

    @CmsArticleAuthor({ comment: '作者' })
    author!: string;

    @CmsArticleType({ comment: '文章类型' })
    type!: string;

    @DateTime({ comment: '发布时间' })
    post_time!: Date;

    @CreateDate({
        comment: '创建日期'
    })
    create_date!: Date;

    @UpdateDate({
        comment: '更新日期'
    })
    update_date!: Date;
}